Component({
  properties: {
    //属性值可以在组件使用时指定
     creditChange:{
       type:Boolean , 
       value:false
     } ,
     creditNum:{
       type:Number ,
       value:0
     } ,
     NavigateBackOff:{
      type:Boolean ,
      value:false
    } ,

  },
  data: {
    // 组件内部数据
    date:"" ,
    dateWeek:""
    
   } , 
   attached(){
     let date = new Date();
     
    
     let weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
    
     this.setData({
       date:date.getFullYear()+"-"+ (date.getMonth()*1+1) ,
       dateWeek:weeks[date.getDay()]
     })
     
   } ,
  //自定义方法
   methods: {
    onStaticFun(){} ,
    oncreditChange(){
     const _this = this;
     this.setData({
      creditChange:false
     } , ()=>{
       if(_this.data.NavigateBackOff){
          wx.navigateBack({
            delta: 2,
          })
       }
     }) 



    }
   } ,
   
})